@ GNU AS assembler header file for ToolAction
@ Written by DefMod (Dec  9 2012) on Sun Dec  9 15:48:09 2012
@ Tony van der Hoff, tony@mk-net.demon.co.uk, 14 May 2001; OSLib V6.22

@ OSLib---efficient, type-safe, transparent, extensible,
@ register-safe API coverage of RISC OS
@ 
@ Copyright (c) 1994-2012 Jonathan Coxhead and OSLib maintainers
@ 
@ Licence:
@ 
@    OSLib is free software; you can redistribute it and/or modify
@ it under the terms of the GNU General Public License as published by
@ the Free Software Foundation; either version 1, or (at your option)
@ any later version - and this with the following clarification and
@ special exception:
@ 
@    Linking this library statically or dynamically with other modules
@ is making a combined work based on this library. Thus, the terms
@ and conditions of the GNU General Public License cover the whole
@ combination.
@ 
@    As a special exception, the copyright holders of this library
@ give you permission to link this library with independent modules
@ to produce an executable, regardless of the license terms of these
@ independent modules, and to copy and distribute the resulting
@ executable under terms of your choice, provided that you also meet,
@ for each linked independent module, the terms and conditions of the
@ license of that module. An independent module is a module which is
@ not derived from or based on this library. If you modify this
@ library, you may extend this exception to your version of the library,
@ but you are not obliged to do so. If you do not wish to do so, delete
@ this exception statement from your version.
@ 
@    OSLib is distributed in the hope that it will be useful,
@ but WITHOUT ANY WARRANTY; without even the implied warranty of
@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@ GNU General Public License for more details.
@ 
@    You should have received a copy of the GNU General Public License
@ along with this programme; if not, write to the Free Software
@ Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, USA.

#ifndef ToolAction_Hdr
#  define ToolAction_Hdr

#  ifndef Get_Types
#    define Get_Types
#    include "oslib/Types.Hdr"
#  endif

#  ifndef Get_OS
#    define Get_OS
#    include "oslib/OS.Hdr"
#  endif

#  ifndef Get_Toolbox
#    define Get_Toolbox
#    include "oslib/Toolbox.Hdr"
#  endif

#  ifndef Get_Gadget
#    define Get_Gadget
#    include "oslib/Gadget.Hdr"
#  endif

@Symbols for constants
#  define Class_ToolAction 0x4014
#  define Error_ToolActionOutOfMemory 0x80e920
#  define Error_ToolActionCantCreateIcon 0x80e921
#  define Error_ToolActionCantCreateObject 0x80e922
#  define ToolAction_GenerateSelect 0x1
#  define ToolAction_IsText 0x2
#  define ToolAction_On 0x4
#  define ToolAction_AutoToggle 0x8
#  define ToolAction_NoPressedSprite 0x10
#  define ToolAction_AutoRepeat 0x20
#  define ToolAction_ShowTransient 0x40
#  define ToolAction_ShowAsPopUp 0x80
#  define ToolAction_HasFadeSprite 0x100
#  define Action_ToolActionSelected 0x140140
#  define ToolAction_SelectedAdjust 0x1
#  define ToolAction_SelectedSelect 0x4
#  define ToolAction_IdentMask 0xf
#  define ToolAction_IdentOff 0x0
#  define ToolAction_IdentOn 0x1
#  define ToolAction_IdentFade 0x2

@Symbols for structure offsets and sizes
        .struct 0
ToolAction_Gadget_off_text     : .skip   Toolbox_StringReference
ToolAction_Gadget_off_text_limit: .skip   Int
ToolAction_Gadget_on_text      : .skip   Toolbox_StringReference
ToolAction_Gadget_on_text_limit: .skip   Int
ToolAction_Gadget_click_action : .skip   Bits
ToolAction_Gadget_select_show  : .skip   Toolbox_StringReference
ToolAction_Gadget_adjust_action: .skip   Bits
ToolAction_Gadget_adjust_show  : .skip   Toolbox_StringReference
ToolAction_Gadget_fade_text    : .skip   Toolbox_StringReference
ToolAction_Gadget_fade_text_limit: .skip   Int
ToolAction_Gadget              : 

        .struct 0
        Gadget_Object_MEMBERS ToolAction_Object
ToolAction_Object_off_text     : .skip   Toolbox_StringReference
ToolAction_Object_off_text_limit: .skip   Int
ToolAction_Object_on_text      : .skip   Toolbox_StringReference
ToolAction_Object_on_text_limit: .skip   Int
ToolAction_Object_click_action : .skip   Bits
ToolAction_Object_select_show  : .skip   Toolbox_StringReference
ToolAction_Object_adjust_action: .skip   Bits
ToolAction_Object_adjust_show  : .skip   Toolbox_StringReference
ToolAction_Object_fade_text    : .skip   Toolbox_StringReference
ToolAction_Object_fade_text_limit: .skip   Int
ToolAction_Object              : 

        .struct 0
        .skip   Bits
ToolAction_IdentFlags          : 


@Symbols for SWI's and SWI reason codes
.set XToolAction_ToolAction,0x160140
.set ToolAction_ToolAction,0x140140

#  define ToolAction_SetIdent 0x140140
   @Entry
   @  R0 = flags (ToolAction_IdentFlags)
   @  R1 = window (Toolbox_O)
   @  R2 = &140140
   @  R3 = toolaction (Toolbox_C)

#  define ToolAction_GetIdent 0x140141
   @Entry
   @  R0 = flags (Bits)
   @  R1 = window (Toolbox_O)
   @  R2 = &140141
   @  R3 = toolaction (Toolbox_C)
   @Exit
   @  R0 = ident (ToolAction_IdentFlags)

#  define ToolAction_SetAction 0x140142
   @Entry
   @  R0 = flags (Bits)
   @  R1 = window (Toolbox_O)
   @  R2 = &140142
   @  R3 = toolaction (Toolbox_C)
   @  R4 = select_action (Bits)
   @  R5 = adjust_action (Bits)

#  define ToolAction_GetAction 0x140143
   @Entry
   @  R0 = flags (Bits)
   @  R1 = window (Toolbox_O)
   @  R2 = &140143
   @  R3 = toolaction (Toolbox_C)
   @Exit
   @  R0 = select_action (Bits)
   @  R1 = adjust_action (Bits)

#  define ToolAction_SetClickShow 0x140144
   @Entry
   @  R0 = flags (Bits)
   @  R1 = window (Toolbox_O)
   @  R2 = &140144
   @  R3 = toolaction (Toolbox_C)
   @  R4 = select_show_object (Toolbox_O)
   @  R5 = adjust_show_object (Toolbox_O)

#  define ToolAction_GetClickShow 0x140145
   @Entry
   @  R0 = flags (Bits)
   @  R1 = window (Toolbox_O)
   @  R2 = &140145
   @  R3 = toolaction (Toolbox_C)
   @Exit
   @  R0 = select_show_object (Toolbox_O)
   @  R1 = adjust_show_object (Toolbox_O)

#  define ToolAction_SetState 0x140146
   @Entry
   @  R0 = flags (Bits)
   @  R1 = window (Toolbox_O)
   @  R2 = &140146
   @  R3 = toolaction (Toolbox_C)
   @  R4 = on (Bool)

#  define ToolAction_GetState 0x140147
   @Entry
   @  R0 = flags (Bits)
   @  R1 = window (Toolbox_O)
   @  R2 = &140147
   @  R3 = toolaction (Toolbox_C)
   @Exit
   @  R0 = on (Bool)

#endif
